package com.plugin.manage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.plugin.core.model.entity.ElderRoom;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 房间管理Mapper接口
 *
 * @author mark
 * @date 2025-07-31
 */
@Mapper
public interface ElderRoomMapper extends BaseMapper<ElderRoom> {

    /**
     * 统计可用房间数量
     * 统计elder_room表中status=1（可用）的记录数
     * 
     * @return 可用房间数量
     */
    @Select("SELECT COUNT(*) FROM elder_room WHERE del = 0 AND status = 1")
    Long countAvailableRooms();






}
